includeJS($base_url+'js/plugin/ajaxfileupload.js');
includeJS($base_url+'js/ajax/ads.js');

//Begin Map

includeJS('http://www.google.com/jsapi?key=ABQIAAAAnNDkXRdpY7h8yT2PzmB4MxT2yXp_ZAY8_ufC3CFXhHIE1NvwkxRnpGtnxyAr2uQe4-7PavZQL1cIVw');
includeJS('http://maps.google.com/maps/api/js?sensor=false');
includeJS($base_url+'js/plugin/jquery.geolocationpicker.js');

$(document).ready(function(){
	function getAddress(){
	  return $('#tf_address').val();
	}
	
	$('a#map').geoLocationPicker({
	   defaultAddressCallback: getAddress,
	   tarField: 'tf_geo_location'
	});
	
	var geo = $('input#tf_geo_location').val().split(',');
	var lat  = geo[0];
	var long = geo[1];

	$('a#show_on_map').geoLocationPicker({
	   defaultAddressCallback: getAddress,
	   defaultLat: lat,
	   defaultLng: long,
	   marker_draggable: false
	});	
});
//End Map

//Begin Datetimepicker
includeCSS($base_url+'js/jqueryui/css/ui-lightness/jquery-ui-1.8.7.custom.css');
includeCSS($base_url+'css/datetimepicker.css');
includeJS($base_url+'js/jqueryui/js/jquery-ui-1.8.7.custom.min.js');
includeJS($base_url+'js/plugin/jquery-ui-timepicker-addon.js');

$(document).ready(function() {
	$('#tf_date_begin').datetimepicker({
		showSecond: true,
		dateFormat: 'dd/mm/yy',
		timeFormat: 'hh:mm:ss'
	});
	
	$('#tf_date_end').datetimepicker({
		showSecond: true,
		dateFormat: 'dd/mm/yy',
		timeFormat: 'hh:mm:ss'
	});
});    	
//End Datetimepicker